Skip to content

docs: fix stale facts across .ai/ and README - #179

Merged
devsuitup merged 9 commits into
mainfrom
chore/docs-accuracy
Sep 4, 2026
Merged

devsuitup merged 9 commits into
mainfrom
chore/docs-accuracy

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

What

Nine commits, one per file (or coherent group), each fixing documentation that no longer matches the codebase. No code changes - .md files only.

Why

.ai/shared-guidelines.md and .ai/contexts/*.md are what AI agents working on this repo build on without re-deriving. Stale line numbers, LOC counts, and an outdated investigation protocol in there cost more than an omission would, because they're read as ground truth.

Changes

  • trigger-watcher.md: the "take four control shots" protocol still told the next investigator to vary pointer position, even though the CLI never enables mouse tracking (already established two paragraphs above it) - the pointer was never a valid axis. Replaced with what actually worked: arming the trace on an idle session with nobody at the keyboard, which found CPR/DECXCPR at 59% of pty.input traffic (PR fix(triggers): exclude CPR/DECXCPR from the composer quiet clock #170, open). Also fixed the file's own LOC estimate.
  • shared-guidelines.md: ~/workspace/switchboard doesn't exist on this checkout (it's C:\Serveur\switchboard, Windows 11); main.js is ~2600 LOC now, not ~1850; two invariants written against the Linux AppImage deployment are now labelled as such instead of being read as universal; fixed a broken relative link (README.md from inside .ai/ needs ../README.md).
  • ipc-bridge.md / subagent-observability.md / viewer-panel.md / schedule-runner.md / session-cache.md: corrected LOC estimates and file:line references that had drifted from the current tree (all reverified with wc -l / grep -n against the checked-out code).
  • contexts/README.md: "~150 lines each" and "1800 LOC of main.js" - neither is true anymore (docs now range 76-526 lines; main.js is ~2600).
  • README.md / docs/README.md: stopped citing the repo's CLAUDE.md as if it held the content itself - it's a one-line @.ai/shared-guidelines.md include; pointed at the file that actually documents the fork conventions.

Not fixed here (flagged for a separate issue, not doc)

  • Taskfile.yaml:47 still says task test runs "(24 tests)" - the suite is at ~900 now. Not a .md file, out of scope for this PR.
  • .ai/project.json:36 still says ~/workspace/switchboard. Same reason.

Verification

  • Every LOC figure changed was measured with wc -l against this branch's checkout.
  • Every line-number reference changed was confirmed with grep -n against the actual current line.
  • The CPR/DECXCPR finding in trigger-watcher.md was cross-checked against PR fix(triggers): exclude CPR/DECXCPR from the composer quiet clock #170 (open, devsuitup/switchboard), not just asserted.
  • .ai/shared-guidelines.md's "Quick orientation" table links and docs/README.md's page list were all checked to resolve to existing files - no changes needed there.

…ocol

The "take four control shots" section still told the next investigator to
vary pointer position, even though the same section had already shown that
Claude Code never enables mouse tracking and xterm.js de-duplicates identical
motion - the pointer could never have been the variable. What actually closed
the question was arming the trace on an idle session with nobody at the
keyboard: a 340s trace found CPR/DECXCPR at 59% of pty.input traffic, not the
already-excluded SGR mouse reports at 20%. Replace the protocol with what
worked, and flag the 10-code-point cap on the cp field as a reading pitfall.

Also correct trigger-watcher.js's LOC estimate (~800 -> ~1050, measured).
- ~/workspace/switchboard doesn't exist on this checkout; it's
  C:\Serveur\switchboard on Windows 11. Fixed the two path references.
- main.js is measured at ~2600 LOC now, not ~1850.
- Invariants #1 and #2 (and half of #6) describe the Linux AppImage
  deployment specifically (appimagelauncherd, npm run build:linux,
  ~/Applications/). Labelled them as such instead of deleting the
  field-measured incidents they carry, and noted the Windows equivalent
  is unverified rather than implicitly safe.
- Fixed a broken relative link: [README.md](README.md) from inside .ai/
  resolves to .ai/README.md, which doesn't exist; needed ../README.md
  like the other README link in this same file already has.
preload.js is 152 lines (was ~130), main.js is ~2600 (was ~1850) - both
measured with wc -l. The session-forked send in session-transitions.js
is at line 427, not 336; the code moved since this was written.
The file has moved on since these were written:
- the routing branch (dataset.subagent && session.parentSessionId) is
  now at sidebar.js:1082, not :771
- grid-view.js/sidebar.js load at index.html:135/:139, not :132/:136

Verified against the current tree; the surrounding claims (script load
order, dataset discriminator) still hold.
public/viewer-panel.js is 414 lines (was ~365, measured). The Ctrl+S
Save-Page-prevention keydown listener in viewer-toolbar.js is at line
256, not 230 - checked with wc -l / grep against the current file.
…ne ref

schedule-runner.js is 311 lines now (was ~220). The startScheduler()
call site in main.js is at line 2517, not 1618 (main.js has grown
substantially); kept the existing "or wherever" hedge since this number
will keep moving.
All five were stale, measured with wc -l against the current tree:
db.js ~450 -> ~895, session-cache.js ~525 -> ~690, read-session-file.js
~280 -> ~420, encode-project-path.js 14 -> 28 (was cited as an exact
count, not an estimate), derive-project-path.js 64 -> ~155.
"~150 lines each" hasn't been true for a while - the seven docs range
76 to 526 lines (measured with wc -l). main.js is ~2600 LOC now, not
1800.
CLAUDE.md at the repo root is one line: @.ai/shared-guidelines.md. Both
README.md and docs/README.md pointed AI agents at CLAUDE.md as though
it documented fork conventions and invariants directly. Point at
.ai/shared-guidelines.md, the file that actually does, and note the
include relationship instead of leaving it implicit.
@devsuitup
devsuitup merged commit 4c17a90 into main Sep 4, 2026
7 checks passed
@devsuitup
devsuitup deleted the chore/docs-accuracy branch September 4, 2026 11:36
@devsuitup devsuitup mentioned this pull request Sep 4, 2026
devsuitup added a commit that referenced this pull request Sep 4, 2026
Ships #166, #168, #169, #170, #179, #180 and #182.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant